import Vue from 'vue'
import Vuex from 'vuex'

import d2admin from './modules/d2admin'

Vue.use(Vuex)

export default new Vuex.Store({
  modules: {
    d2admin
  },
  state: {
    form: {
      name: '',
      sex: '男',
      birthday: '',
      education: '',
      major: '',
      IdCard: '',
      degree: '',
      age: '',
      title: '',
      workunits: '',
      experience: '',
      educationexperience: '',
      training: '',
      certificate: '',
      ava: '',
      promise: '0'
    }
  },
  mutations: {
    setForm (state, _state) {
      window.localStorage.setItem('form', JSON.stringify(_state))
      state.form = _state
    }
  }
})
